package com.sunlg.smarthome.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import com.sunlg.smarthome.base.ActivityManager;
import com.sunlg.smarthome.contract.presenter.LogoutPresenter;

public class ExitService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        ActivityManager activityManager = ActivityManager.getInstance();
        activityManager.finishAllActivity();
        new LogoutPresenter().logout();
        stopSelf();
    }
}
